package com.sandasai.action.student;
import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.sandasai.service.StudentManager;
import com.sandasai.vo.StudentBean;
@Controller
@Scope("prototype")
public class StudentPersonInfoPageAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Resource
    private StudentManager studentManager;

	/**
     * @return
     */
    public String execute() {
        ActionContext ctx = ActionContext.getContext();
        String username = (String) ctx.getSession().get("username");
        StudentBean studentBean = studentManager.getStudentBean(username);
        ctx.put("studentBean", studentBean);
        return SUCCESS;
    }
}